<template>
  <div class="auto">
    <partial-view v-ref:pv>
      <!-- <div class="row"> -->
        <!-- <label class = " col-sm-3 control-label">用户姓名:</label> -->
        <!-- <span style="padding:0" class = " col-sm-3">{{model[0].f_user_name}}</span> -->
        <!-- <label class = "col-sm-3 control-label">操作人:</label>
        <span class = "col-sm-3">{{model.f_operator}}</span> -->
      <!-- </div> -->
      <table class="table table-bordered table-condensed self-table" id="table" >
        <!-- <tr>
           <td><b>享受减免账户</b></td>
           <td>{{data.f_user_name}}</td>
        </tr> -->
          <tr>
             <td><b>减免科目</b></td>
             <td>{{model.f_subject}}</td>
          </tr>
          <tr>
            <td><b>减免金额</b></td>
            <td>{{model.f_fee}}</td>
          </tr>
          <tr>
            <td><b>审核领导</b></td>
            <td>{{model.f_leader}}</td>
          </tr>
          <tr>
            <td><b>操作日期</b></td>
            <td>{{model.f_date}}</td>
          </tr>
      </table>

    </partial-view>
  </div>
</template>

<script>
import Table from '../../../../Table'
export default {
  title: '报建费用减免',
  props: ['data'],
  data () {
    return {
      model: {}
    }
  },
  ready () {
    console.log('dadddddddddddddddddddddreduce', this.data)
    let sql = 'singleTable_OrderBy'
    let condition = {
      items: '*',
      tablename: 't_costreduction',
      condition: 'id = ' + this.data.id,
      orderitem: 'id'
    }
    this.$info(`加载数据中..., sql:${sql}`)
    this.$refs.pv.load('rs/logic/getOneData', {data: {sql: sql, params: condition}}).then((a) => {
      this.$info(`成功获取到数据！, data:${JSON.stringify(a.data)}`)
      this.model = a.data
      console.log('1111111model', this.model)
      console.log('1111111data', a.data)
    }).catch((error) => {
      if (error.status) {
        this.$warn(`加载数据出错, ${JSON.stringify(error)}`)
        return
      }
      throw error
    })
  },
  methods: {
    // 获取表中字段对应的中文名
    getValue (key) {
      return Table.data[key]
    }
  }
}
</script>
